﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.Collections.Generic;
using ToolBoxPro;
using LinqObj;

public partial class campaigns : RedirectPage
{
    private int propertyID;
    public int PropertyID { get { return this.propertyID; } set { this.propertyID = value; } }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ((Label)Master.FindControl("lblTitle")).Text = "Manage Campaigns";
            ((System.Web.UI.HtmlControls.HtmlImage)Master.FindControl("imgHeading")).Src = "images/icon_manage.gif";
        }

        // To prevent the browser to cache the page.
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();
        Response.Cache.SetExpires(DateTime.MinValue);

        IEnumerable<Property> propertyList = Property.LoadPropertyList(Int32.Parse(Session[FormContract.AGENT_GROUP_ID].ToString()));
        PropertyListBuilder propertyListGenerator = new PropertyListBuilder(propertyList);
        this.propertyList.Controls.Add(propertyListGenerator.BuildPropertyList());
    }


}
